package top.yaofengqiao.springcloudsimple.tenant.starter.config;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author yfq
 * @date 2024/8/12 16:14
 * @description
 */
@AutoConfiguration
public class SimpleTenantAutoConfiguration {

    @Bean
    public ThreadPoolExecutor tenantThreadPoolExecutor() {
        return new ThreadPoolExecutor(10, 20, 30, TimeUnit.SECONDS, new LinkedBlockingDeque<>(100));
    }

}
